﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace Skynet.WebSite.Demos
{
    public partial class TransferFounds : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["state"] == null)
            {
                Session["state"] = 1000;
            }        
        }
        protected void Page_PreRender(object sender, EventArgs e)
        {
            Response.Write(Session["state"].ToString());
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            Session["state"] = (int)Session["state"] - int.Parse(this.TextBox1.Text);
            this.Label1.Text = "transfer " + this.TextBox1.Text + this.DropDownList1.SelectedValue + " new state " + Session["state"].ToString();            
        }
    }
}